<template>
  <!-- 访客记录-----访客记录 -->
  <div class="visitor-index">
    <a-row class="aRow-wrapper" :gutter="12">
      <a-col class="tree-wrapper" :span="4">
        <left-tree></left-tree>
      </a-col>
      <a-col class="listContent-wrapper" :span="20">
        <top-title :updateTime="true" :content="content"></top-title>

        <div class="l-w_content">
          <div class="tabsList">
            <a-tabs class="tabs" v-model="activeKey" @tabClick="handelClick">
              <a-tab-pane key="1" tab="清洗记录">
                <rinse v-if="activeKey == 1"></rinse>
              </a-tab-pane>
              <a-tab-pane key="2" tab="逾期未清洗">
                <overdue v-if="activeKey == 2"></overdue>
              </a-tab-pane>
            </a-tabs>
          </div>
        </div>
      </a-col>
    </a-row>
  </div>
</template>
<script>
import leftTree from '@/components/leftTree'
import topTitle from '@/components/topTitle'
import rinse from './rinse'
import overdue from './overdue'
export default {
  name: 'visitor-index',
  components: { leftTree, topTitle, rinse, overdue },
  data() {
    return {
      content: [['清洗记录']],
      activeKey: '1',
      key: '',
    }
  },
  mounted() {
    this.activeKey = this.$route.query.activeKey ? this.$route.query.activeKey : '1'
  },
  methods: {
    handelClick(event) {
      this.activeKey = event
    },
  },
}
</script>
<style lang="less" scoped>
.visitor-index {
  width: 100%;
  height: 100%;
}
</style>
